{% extends "base.html" %}

{% block title %}Organization Profile - Volunteer Platform{% endblock %}

{% block content %}
<div class="container mt-4">
    <div class="row">
        <div class="col-md-8 offset-md-2">
            <div class="card">
                <div class="card-body">
                    <h2 class="card-title mb-4">Organization Profile</h2>
                    
                    <form method="POST" action="{{ url_for('organization_profile_update') }}">
                        <div class="mb-3">
                            <label for="name" class="form-label">Organization Name</label>
                            <input type="text" class="form-control" id="name" name="name" 
                                   value="{{ organization.name }}" required>
                        </div>
                        
                        <div class="mb-3">
                            <label for="introduction" class="form-label">Organization Introduction</label>
                            <textarea class="form-control" id="introduction" name="introduction" 
                                      rows="4">{{ organization.introduction or '' }}</textarea>
                        </div>
                        
                        <div class="mb-3">
                            <label for="phone" class="form-label">Contact Phone</label>
                            <input type="tel" class="form-control" id="phone" name="phone"
                                   value="{{ organization.phone or '' }}">
                        </div>
                        
                        <div class="mb-3">
                            <label for="address" class="form-label">Address</label>
                            <input type="text" class="form-control" id="address" name="address"
                                   value="{{ organization.address or '' }}">
                        </div>
                        
                        <div class="text-center">
                            <button type="submit" class="btn btn-primary">Save Changes</button>
                            <a href="{{ url_for('organization_dashboard') }}" class="btn btn-secondary">Back to Dashboard</a>
                        </div>
                    </form>
                    
                    <hr class="my-4">
                    
                    <h3 class="mb-3">Change Password</h3>
                    <form method="POST" action="{{ url_for('organization_change_password') }}">
                        <div class="mb-3">
                            <label for="old_password" class="form-label">Current Password</label>
                            <input type="password" class="form-control" id="old_password" 
                                   name="old_password" required>
                        </div>
                        
                        <div class="mb-3">
                            <label for="new_password" class="form-label">New Password</label>
                            <input type="password" class="form-control" id="new_password" 
                                   name="new_password" required>
                        </div>
                        
                        <div class="mb-3">
                            <label for="confirm_password" class="form-label">Confirm New Password</label>
                            <input type="password" class="form-control" id="confirm_password" 
                                   name="confirm_password" required>
                        </div>
                        
                        <div class="d-grid gap-2">
                            <button type="submit" class="btn btn-warning">Change Password</button>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
{% endblock %} 